package com.meitianhui.convenitenbuy.module.store.http;

import com.meitianhui.convenitenbuy.base.BaseArrayResponse;
import com.meitianhui.convenitenbuy.base.BaseMapResponse;
import com.meitianhui.convenitenbuy.base.BaseResponse;
import com.meitianhui.convenitenbuy.main.model.bean.HyphenateInfo;
import com.meitianhui.convenitenbuy.module.order.model.bean.EmptyInfo;
import com.meitianhui.convenitenbuy.module.order.model.bean.FightGroupShop;
import com.meitianhui.convenitenbuy.module.store.model.CouponCardInfo;
import com.meitianhui.convenitenbuy.module.store.model.DSKBean;
import com.meitianhui.convenitenbuy.module.store.model.DskStoreDetailBean;
import com.meitianhui.convenitenbuy.module.store.model.GroupSaleInfo;
import com.meitianhui.convenitenbuy.module.store.model.OneLotteryParticipateBean;
import com.meitianhui.convenitenbuy.module.store.model.PayInfoBean;
import com.meitianhui.convenitenbuy.module.store.model.StoreDetailCount;
import com.meitianhui.convenitenbuy.module.store.model.StoreDetailInfo;
import com.meitianhui.convenitenbuy.module.store.model.StoreInfo;
import com.meitianhui.convenitenbuy.module.store.model.StoreOneLotteryBean;
import com.meitianhui.convenitenbuy.module.store.model.StoreSelectedGood;
import com.meitianhui.convenitenbuy.module.store.model.StoreType;
import com.meitianhui.convenitenbuy.module.store.model.YYYLuckBean;

import retrofit2.http.POST;
import retrofit2.http.Query;
import rx.Observable;

/**
 * Created by Administrator on 2017/11/1.
 */

public interface StoreApi {
    /**
     * 查询加盟店集合数据
     * @param appToken
     * @param service
     * @param page
     * @param params
     * @return
     */
    @POST("member")
    Observable<BaseResponse<StoreInfo>> getStoreList(@Query("app_token") String appToken,@Query("service") String service,@Query("page") String page,@Query("params") String params);
    /**
     * 查询加盟店详情数据
     * @param appToken
     * @param service
     * @param params
     * @return
     */
    @POST("member")
    Observable<BaseResponse<StoreDetailInfo>> getStoreDetailInfo(@Query("app_token") String appToken, @Query("service") String service, @Query("params") String params);
    /**
     * 获取数量
     * @param appToken
     * @param service
     * @param params
     * @return
     */
    @POST("goods")
    Observable<BaseResponse<StoreDetailCount>> getStoreDetailCount(@Query("app_token") String appToken, @Query("service") String service, @Query("params") String params);

    /**
     * 获取精选产品类型
     * @param appToken
     * @param service
     * @param params
     * @return
     */
    @POST("goods")
    Observable<BaseMapResponse> getStoreSelectedType(@Query("app_token") String appToken, @Query("service") String service, @Query("params") String params);


    /**
     * 获取精选产品
     * @param appToken
     * @param service
     * @param params
     * @return
     */
    @POST("goods")
    Observable<BaseResponse<StoreSelectedGood>> getStoreSelectedGood(@Query("app_token") String appToken, @Query("service") String service, @Query("params") String params);


    /**
     * 获取商铺类型
     * @param appToken
     * @param service
     * @param params
     * @return
     */
    @POST("member")
    Observable<BaseArrayResponse<StoreType>> getStoreType(@Query("app_token") String appToken, @Query("service") String service, @Query("params") String params);


    /**
     * 操作收藏
     */
    @POST("member")
    Observable<BaseResponse<EmptyInfo>> operationCollect(@Query("app_token") String appToken, @Query("service") String service, @Query("params") String params);

    /**
     *
     * @param userToken
     * @param service
     * @param params
     * @return
     */
    @POST("community")
    Observable<BaseResponse<HyphenateInfo>> getHyphenateInfo(@Query("user_token") String userToken, @Query("service") String service, @Query("params") String params);

    /**
     * 获取团购预售
     * @param appToken
     * @param service
     * @param params
     * @return
     */
    @POST("opsorder")
    Observable<BaseResponse<GroupSaleInfo>> getGroupSale(@Query("app_token") String appToken, @Query("service") String service, @Query("params") String params);
    /**
     * 获取团购预售商品详情
     * @param userToken
     * @param service
     * @param params
     * @return
     */
    @POST("opsorder")
    Observable<BaseResponse<FightGroupShop>> getGroupSaleDetail(@Query("user_token") String userToken, @Query("service") String service, @Query("params") String params);

    /**
     * 获取优惠卡牌
     * @param appToken
     * @param service
     * @param params
     * @return
     */
    @POST("goods")
    Observable<BaseResponse<CouponCardInfo>> getCouponCard(@Query("app_token") String appToken, @Query("service") String service, @Query("params") String params);
    /**
     * 获取门店一元抽奖活动
     * @param appToken
     * @param service goods.ldActivityListByStoresForConsumerPageFind
     * @param params
     * @return
     */
    @POST("goods")
    Observable<BaseResponse<StoreOneLotteryBean>> getStoreOneLottery(@Query("app_token") String appToken, @Query("service") String service, @Query("params") String params);

    /**
     * 一元购付款
     *
     * @param userToken
     * @param service   goods.ldActivityPayInfoFind
     * @param params
     * @return
     */
    @POST("goods?")
    Observable<BaseResponse<PayInfoBean>> payOneLottery(@Query("user_token") String userToken, @Query("service") String service, @Query("params") String params);

    /**
     * 提交一元购订单
     *
     * @param userToken
     * @param service   finance.ldOrderPay
     * @param params
     * @return
     */
    @POST("finance?")
    Observable<BaseResponse<EmptyInfo>> payOneLotteryOrder(@Query("user_token") String userToken, @Query("service") String service, @Query("params") String params);

    /**
     * 查询我的参与
     *
     * @param userToken
     * @param service   goods.ldActivityProcessForConsumerPageFind
     * @param params
     * @return
     */
    @POST("goods?")
    Observable<BaseResponse<OneLotteryParticipateBean>> getOneLotteryParticipate(@Query("user_token") String userToken, @Query("service") String service, @Query("page") String pageParams, @Query("params") String params);

    /**
     * 获取中奖信息
     *
     * @param userToken
     * @param service   goods.ldYyyActivityLuckDrawFind
     * @param params
     * @return
     */
    @POST("goods?")
    Observable<BaseResponse<YYYLuckBean>> getYYYData(@Query("user_token") String userToken, @Query("service") String service,  @Query("params") String params);
    /**
     * 上传中奖信息
     *
     * @param userToken
     * @param service   goods.ldActivtiyWinning
     * @param params
     * @return
     */
    @POST("goods?")
    Observable<BaseResponse<EmptyInfo>> postLuckMsg(@Query("user_token") String userToken, @Query("service") String service,  @Query("params") String params);

    /**
     * 领取优惠券
     *
     * @param userToken
     * @param service   goods.ldActivityProcessForConsumerPageFind
     * @param params
     * @return
     */
    @POST("goods?")
    Observable<BaseResponse<EmptyInfo>> receiveCoupon(@Query("user_token") String userToken, @Query("service") String service,@Query("params") String params);

    /**
     * 礼券兑换
     *
     * @param userToken
     * @param service
     * @param jsonParams
     * @return
     */
    @POST("finance?")
    Observable<BaseResponse<EmptyInfo>> couponExchange(@Query("user_token") String userToken, @Query("service") String service, @Query("params") String jsonParams);

    /**
     * 获取定时开活动信息
     *
     * @param userToken
     * @param service goods.ldActivitiesPageFind
     * @param jsonParams
     * @return
     */
    @POST("goods?")
    Observable<BaseResponse<DSKBean>> getDskInfo(@Query("user_token") String userToken, @Query("service") String service, @Query("params") String jsonParams);

    /**
     * 获取定时开活动信息
     *
     * @param userToken
     * @param service goods.ldActivityProcessForStorePageFind
     * @param jsonParams
     * @return
     */
    @POST("goods?")
    Observable<BaseResponse<DskStoreDetailBean>> getStoreDskInfo(@Query("user_token") String userToken, @Query("service") String service,@Query("page") String pageParams, @Query("params") String jsonParams);

}
